Class java.util.UUEncoder
All Packages This Package Previous Next
Class java.util.UUEncoder
java.lang.Object
|
+----java.util.CharacterEncoder
|
+----java.util.UUEncoder
-
public class
UUEncoder
-
extends CharacterEncoder
This class implements a Berkeley uu character encoder. This encoder
was made famous by uuencode program.
The basic character coding is algorithmic, taking 6 bits of binary
data and adding it to an ASCII ' ' (space) character. This converts
these six bits into a printable representation. Note that it depends
on the ASCII character encoding standard for english. Groups of three
bytes are converted into 4 characters by treating the three bytes
a four 6 bit groups, group 1 is byte 1's most significant six bits,
group 2 is byte 1's least significant two bits plus byte 2's four
most significant bits. etc.
In this encoding, the buffer prefix is:
begin [mode] [filename]
This is followed by one or more lines of the form:
(len)(data)(data)(data) ...
where (len) is the number of bytes on this line. Note that groupings
are always four characters, even if length is not a multiple of three
bytes. When less than three characters are encoded, the values of the
last remaining bytes is undefined and should be ignored.
The last line of data in a uuencoded file is represented by a single
space character. This is translated by the decoding engine to a line
length of zero. This is immediately followed by a line which contains
the word 'end[newline]'
-
Version:
-
1.3, 16 Mar 1995
-
Author:
-
Chuck McManis
-
See Also:
-
CharacterEncoder,
UUDecoder
-
UUEncoder()
-
Default - buffer begin line will be:
begin 644 encoder.buf
-
UUEncoder(String)
-
Specifies a name for the encoded bufer, begin line will be:
begin 644 [FNAME]
-
UUEncoder(String, int)
-
Specifies a name and mode for the encoded bufer, begin line will be:
begin [MODE] [FNAME]
UUEncoder
public UUEncoder()
-
Default - buffer begin line will be:
begin 644 encoder.buf
UUEncoder
public UUEncoder(String fname)
-
Specifies a name for the encoded bufer, begin line will be:
begin 644 [FNAME]
UUEncoder
public UUEncoder(String fname,
int newMode)
-
Specifies a name and mode for the encoded bufer, begin line will be:
begin [MODE] [FNAME]
All Packages This Package Previous Next